package com.songlanyun.modules.order.dao;

import com.songlanyun.modules.order.entity.ChildOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.songlanyun.modules.order.model.vo.ChildOrderSlimVO;
import com.songlanyun.modules.order.model.vo.ChildOrderVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * 销售系统中的子订单
 * 
 * @author lubo
 * @email sunlightcs@gmail.com
 * @date 2020-11-16 14:14:42
 */
@Mapper
public interface ChildOrderDao extends BaseMapper<ChildOrder> {
    void closeChildOrders(@Param("userId") Long userId, @Param("orderId") Long orderId);

    Integer getBuyGoodsCount(@Param("userId")Long userId, @Param("goodsId")Long goodsId, @Param("marketingType")Integer marketingType);

    List<ChildOrderVO> vosByOrderId(Long id);

    List<ChildOrderSlimVO> vosSlimByOrderId(Long id);

    BigDecimal getObtainActivationTotalPrice(Long userId);

    List<ChildOrder> selectNotResultOrder();

}
